package com.yeban.javase.day16.state.runnable;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/30
 *
 * 就绪状态 → 计时等待状态
 */
public class RunnableAndTimedWaiting {
    public static void main(String[] args) {
        Thread t = new Thread(() -> {
            try {
                System.out.println("线程睡眠中...");
                Thread.sleep(3000); // 进入 TIMED_WAITING
                System.out.println("睡眠结束");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        t.start();
    }
}
